/********************************************************************************
 *    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    *
 *                                                                              *
 *              This software is distributed under the terms of the             * 
 *              GNU Lesser General Public Licence (LGPL) version 3,             *  
 *                  copied verbatim in the file "LICENSE"                       *
 ********************************************************************************/
#ifndef HISMDUNPACKEDDATA_H
#define HISMDUNPACKEDDATA_H 1

#include <TObject.h>
#include <array>
// #include "TVector3.h"
// #include <map>
// #include <vector>


class TClonesArray;

class HiSmdUnpackedData: public TObject 
{

  public:

    /** Default constructor **/
    HiSmdUnpackedData();

    /** Standard constructor **/
    HiSmdUnpackedData(uint64_t TimeSliceID,
                    uint8_t pxiID, 
                    uint8_t feeID,
                    uint16_t ChannelID,
                    uint16_t TimeOffset,
                    uint16_t Amplitude,
                    uint32_t Position
                    );


    /** Destructor **/
    virtual ~HiSmdUnpackedData();

    /** Output to screen **/
    virtual void Print(const Option_t* opt) const;

    /** Getter **/
    // const uint16_t (*GetWaveformData() const)[4096] { return fWaveformData; }
    uint64_t GetTimeSliceID() const { return fTimeSliceID; }
    uint8_t GetPxiID() const { return fPxiID; }
    uint8_t GetFeeID() const { return fFeeID; }
    uint8_t GetChannelID() const { return fChannelId; }
    uint16_t GetTimeOffset() const { return fTimeOffset; }
    uint16_t GetAmplitude() const { return fAmplitude; }
    uint32_t GetPosition() const { return fPosition; }

  private:
    // Data Members -----------------------
    uint64_t fTimeSliceID{};     // 时间片编号
    uint8_t fPxiID{};              // PXI板号
    uint8_t fFeeID{};              // FEE板号

    uint16_t fChannelId{};                 // 通道号
    uint16_t fTimeOffset{};            // 时间窗口内偏移
    uint16_t fAmplitude{};            // 幅度
    uint32_t fPosition{};              // 位置或Si微条信息


    ClassDef(HiSmdUnpackedData, 1)

};

#endif

